<template>
  <div>
    <el-row :gutter="15">
      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
        <el-col :span="12">
          <el-form-item label="检查时间：" prop="field101">
            <el-time-picker v-model="formData.field101" format="HH:mm:ss" value-format="HH:mm:ss"
              :picker-options='{"selectableRange":"00:00:00-23:59:59"}' :style="{width: '100%'}"
              placeholder="请选择检查时间：" clearable></el-time-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="检查人：" prop="field103">
            <el-input v-model="formData.field103" clearable :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="检查结果：" prop="field109">
            <el-radio-group v-model="formData.field109" size="medium">
              <el-radio v-for="(item, index) in field109Options" :key="index" :label="item.value"
                :disabled="item.disabled">{{item.label}}</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="7">
          <el-form-item label="" prop="field110">
            <el-radio-group v-model="formData.field110" size="medium">
              <el-radio v-for="(item, index) in field110Options" :key="index" :label="item.value"
                :disabled="item.disabled">{{item.label}}</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="17">
          <el-form-item label="" prop="field111">
            <el-radio-group v-model="formData.field111" size="medium">
              <el-radio v-for="(item, index) in field111Options" :key="index" :label="item.value"
                :disabled="item.disabled">{{item.label}}</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item size="large">
            <el-button type="primary" @click="submitForm">提交</el-button>
            <el-button @click="resetForm">重置</el-button>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
  </div>
</template>
<script>
export default {
  components: {},
  props: [],
  data() {
    return {
      formData: {
        field101: null,
        field103: undefined,
        field109: undefined,
        field110: undefined,
        field111: undefined,
      },
      rules: {
        field101: [{
          required: true,
          message: '请选择检查时间：',
          trigger: 'change'
        }],
        field103: [{
          required: true,
          message: '',
          trigger: 'blur'
        }],
        field109: [{
          required: true,
          message: '检查结果：不能为空',
          trigger: 'change'
        }],
        field110: [{
          required: true,
          message: '不能为空',
          trigger: 'change'
        }],
        field111: [{
          required: true,
          message: '不能为空',
          trigger: 'change'
        }],
      },
      field109Options: [{
        "label": "正常",
        "value": 1
      }],
      field110Options: [{
        "label": "异常，异常类型：",
        "value": 1
      }],
      field111Options: [{
        "label": "房颤",
        "value": 1
      }, {
        "label": "其他类型",
        "value": 2
      }],
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (!valid) return
        // TODO 提交表单
      })
    },
    resetForm() {
      this.$refs['elForm'].resetFields()
    },
  }
}

</script>
<style>
</style>
